// typescript基本类型有：nubmer string boolean enum 数组 元组 void null undefined never any
let num: number = 1;
console.log('num: ', num);
let str: string = "string";
console.log('str: ', str);
let bool: boolean = true;
console.log('bool: ', bool);
//enum表示枚举
enum Color{Red,Blue,White,Black}
let enumVal:Color = Color.Black;
console.log('enumVal: ', enumVal);
let arr:number[] = [0,1];
arr.push(2)
console.log('arr: ', arr);
let tup:[string,number];
tup = ['arr',2];
console.log('tup: ', tup);
//void用来表示函数无返回值类型；
function hello(): void {
    console.log("Hello Runoob");
}
hello()

//联合类型
let multiType: string | number | null = 'multi'
multiType = 333;
console.log('multiType: ', multiType);


